Computerized numerical control (CNC) machines are used to process a product (for example, a shell of a mobile phone). A CNC machine measures a product to capture images of the product. The CNC machine typically includes a position device, which is used to determine a position of a mold placed on a platform. However, the position device wears down eventually from repeated use, and thus a coordinate of a gravity point of the position device changes. Thus, after repeated use, the position device cannot accurately determine the position of the mold.